package com.dianhun.cn.receive;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author cyt
 * @create 2020-08-24 13:59
 */
/**
 * 监听hello队列
 */
@RabbitListener(queues = "hello")
@Component
public class Receive {
    /**
     * 处理接受到的消息
     * @param hello
     */
    @RabbitHandler
    public void process(String hello){
        System.out.println("Receiver:"+hello);
    }
}
